#include "exitdialog.h"

ExitDialog::ExitDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ExitDialog)
{
    ui->setupUi(this);
    setWindowFlags(windowFlags()& ~Qt::WindowMaximizeButtonHint);
    setFixedSize(this->width(), this->height());
}

ExitDialog::~ExitDialog()
{
    qDebug()<<"ExitDialog 资源释放";
    delete ui;
}
void ExitDialog::closeEvent(QCloseEvent *event)
{
    //TODO: 在退出窗口之前，实现希望做的操作
    event = event;
    emit exitClose(0);
}

void ExitDialog::on_zexit_pushButton_clicked()
{
    QApplication::exit();
}

void ExitDialog::on_qexit_pushButton_clicked()
{
    emit exitClose(0);
    this->close();
}
